Skip to content

fix(v1): offer custom and SmartPlan cleaning modes on water-slide devices - #1025

Open
paulleonartcalvo wants to merge 1 commit into
Python-roborock:mainfrom
paulleonartcalvo:fix/water-slide-custom-smart-modes
Open

paulleonartcalvo wants to merge 1 commit into
Python-roborock:mainfrom
paulleonartcalvo:fix/water-slide-custom-smart-modes

Conversation

@paulleonartcalvo

Copy link
Copy Markdown

Fixes #977.

Problem

Water-slide devices report water flow as slider positions, so get_water_modes() returns only the slide range for them. That list has no CUSTOMIZED (204) or SMART_MODE (209) entry, so get_cleaning_mode_options() drops CUSTOM and SMART_MODE even when is_customized_clean_supported / is_smart_clean_mode_set_supported are set. get_current_cleaning_mode() still returns custom / smart_mode for those states, so Home Assistant's cleaning mode select shows unknown whenever the device is in either mode, because the current value is not one of its options.

Change

For water-slide devices, CUSTOM and SMART_MODE are gated on their feature flags alone. Non-slide devices are unchanged. The existing test_cleaning_mode_options_water_slide_device asserted the old behaviour; it now covers each flag combination, and there are new tests for readback and for the write payloads on slide devices.

Device testing

#977 noted that writes had not been tested on hardware. On a Qrevo Edge 3 Pro (roborock.vacuum.a296, water slide, both flags true), docked, through set_clean_motor_mode:

written (fan / water / mop) read back from get_status get_current_cleaning_mode
106 / 204 / 302 106 / 204 / 300 custom
110 / 209 / 306 110 / 209 / 306 smart_mode

Both were accepted. Before this change both read back as a mode that is not in cleaning_mode_options. The device was restored to 102 / 248 / 300 afterwards.

uv run pytest (2287 passed) and uv run pre-commit run --all-files pass.

🤖 Generated with Claude Code

…ices

Water-slide devices report flow as slider positions, so get_water_modes()
has no CUSTOMIZED (204) or SMART_MODE (209) entry for them and
get_cleaning_mode_options() dropped CUSTOM and SMART_MODE even when the
feature flags are set. get_current_cleaning_mode() still classifies those
states, so consumers such as Home Assistant showed an unknown cleaning
mode whenever the device was in custom or SmartPlan mode.

Gate both options on the feature flags alone for water-slide devices.
Verified on a Qrevo Edge 3 Pro (roborock.vacuum.a296): writing
106/204/302 and 110/209/306 with set_clean_motor_mode is accepted and
read back as 106/204/300 and 110/209/306.

Fixes Python-roborock#977

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Water-slide device reports custom mode but capability-derived options exclude it (Qrevo Edge 2 Flow)

1 participant